package com.gzz.demo.pattern.strategy;

public class ClientTest {
    public static void main(String[] args) {
//选择并创建需要使用的策略对象
        IStrategy strategy = new AdvancedStrategy();
        //创建环境
        CalcPrice price = new CalcPrice(strategy);
        //计算价格
        double quote = price.quote(300);
        System.out.println("图书的最终价格为：" + quote);
    }
}
